package com.sq.convert;


import com.sq.entity.User;
import com.sq.vo.UserVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserConvert {

    UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);

    Map<Integer, UserVo> convertMap4(Map<Integer, User> map);

    List<UserVo> convertList4(List<User> users);

    @Mapping(source = "id", target = "id")
    @Mapping(source = "username", target = "name")
    UserVo convert3(User user);


}
